package com.alexjavi.eneagrama.tipos;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.widget.LinearLayout;

import com.actionbar.MiBaseActivity;
import com.witejavi.eneagrama.R;

public class DescripcionDeSubtipos extends MiBaseActivity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		activarActionBar(true);
//		int tipoCategoria = getIntent().getExtras().getInt("categoria");
		int numero = getIntent().getExtras().getInt("numero");
		LinearLayout l;
		//if(tipoCategoria == 0){
			switch(numero){
			case 1:
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion1a);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion1b);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion1c);
				l.setVisibility(View.VISIBLE);
				break;
			case 2:
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion2a);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion2b);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion2c);
				l.setVisibility(View.VISIBLE);
				break;
			case 3:
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion3a);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion3b);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion3c);
				l.setVisibility(View.VISIBLE);
				break;
			case 4:
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion4a);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion4b);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion4c);
				l.setVisibility(View.VISIBLE);
				break;
			case 5:
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion5a);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion5b);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion5c);
				l.setVisibility(View.VISIBLE);
				break;
			case 6:
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion6a);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion6b);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion6c);
				l.setVisibility(View.VISIBLE);
				break;
			case 7:
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion7a);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion7b);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion7c);
				l.setVisibility(View.VISIBLE);
				break;
			case 8:
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion8a);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion8b);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion8c);
				l.setVisibility(View.VISIBLE);
				break;
			case 9:
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion9a);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion9b);
				l.setVisibility(View.VISIBLE);
				l = (LinearLayout) findViewById(R.id.LinearLayoutDescripcion9c);
				l.setVisibility(View.VISIBLE);
				break;
			}
//		}else if(tipoCategoria == 1){
//			
//		}else if(tipoCategoria == 2){
//			
//		}else if(tipoCategoria == 3){
//			
//		}
	}

	@Override
	protected int getLayoutResource() {
		return R.layout.descripcion_de_subtipos;
	}
	
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case android.R.id.home:
			finish();
			return true;
		}

		return super.onOptionsItemSelected(item);
	}

}

